//
//  HRHearRecommendAnswererView.m
//  Hear
//
//  Created by mac on 2018/4/20.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "HRHearRecommendAnswererView.h"

@implementation HRHearRecommendAnswererView

-(id)initWithFrame:(CGRect)frame
{
    if (self == [super initWithFrame:frame]) {
        _answererHeadBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        [self addSubview:_answererHeadBtn];
        [_answererHeadBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(self);
            make.left.mas_equalTo(self);
            make.width.mas_equalTo(45 * scaleWidth);
            make.height.mas_equalTo(45 * scaleWidth);
        }];
        
        _answererNameLabel = [[UILabel alloc] init];
        _answererNameLabel.font = [UIFont systemFontOfSize:16 * scaleWidth];
        _answererNameLabel.textColor = UIColorFromRGB(0xFFFFFF);
        [self addSubview:_answererNameLabel];
        [_answererNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(_answererHeadBtn.mas_top).offset(3 * scaleHeight);
            make.left.mas_equalTo(_answererHeadBtn.mas_right).offset(18 * scaleWidth);
        }];
        
        _answererSexImageView = [[UIImageView alloc] init];
        [self addSubview:_answererSexImageView];
        [_answererSexImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(_answererNameLabel.mas_bottom).offset(10 * scaleHeight);
            make.left.mas_equalTo(_answererNameLabel.mas_left).offset(0);
            make.width.mas_equalTo(14 * scaleWidth);
            make.height.mas_equalTo(14 * scaleHeight);
        }];
        
        _answererAgeLabel = [[UILabel alloc] init];
        _answererAgeLabel.text = @"90后";
        _answererAgeLabel.font = [UIFont systemFontOfSize:12];
        _answererAgeLabel.textColor = UIColorFromRGB(0xFFFFFF);
        [self addSubview:_answererAgeLabel];
        [_answererAgeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(_answererSexImageView.mas_top);
            make.left.mas_equalTo(_answererSexImageView.mas_right).offset(9 * scaleWidth);
            
        }];
        
    }
    return self;
}

@end
